<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0,minimum-scale=1.0, maximum-scale=1.0,user-scalable=no">
    <title>供应商系统</title>
    <link rel="stylesheet" type="text/css" href="/Public/css/bootstrap.css"/>
    <link rel="stylesheet" href="/Public/css/style.css" />
    <link rel="stylesheet" type="text/css" href="/Public/css/font-awesome.min.css"/>
    <link rel="stylesheet" href="/Public/css/see.css" />
</head>
<body>
<div id="app">
    <header class="header">
        <div class="headtop">
            <a href="javascript:;" onclick="history.go(-1)" class="back"><i class="fa fa-angle-left"></i></a>
            <h1>查看商品</h1>
        </div>
        <div class="search">
            <div class="col-xs-5">
                <div class="shop" @click="shopshow">
                    <span>{{shopname}}</span> <i class="fa fa-chevron-down"></i>
                </div>
            </div>
            <div class="col-xs-7" style="margin-top: 3px;">
                <div class="input-group">
                    <input type="text" class="form-control" placeholder="搜索商品" v-model="myseach">
                    <span class="input-group-btn">
						        <button class="btn btn-default" type="button" @click="search()"><span class="glyphicon glyphicon-search"></span></button>
						      </span>
                </div>
            </div>
        </div>
        <nav class="navbox">
            <ul class="nav">
                <li @click="togglenav($event,0)">分类<i class="fa fa-caret-up"></i></li>
                <li @click="togglenav($event,1)">状态<i class="fa fa-caret-up"></i></li>
                <li @click="sorttype(0,$event)">库存<i class="fa fa-caret-up"></i><i class="fa fa-caret-down"></i></li>
                <li @click="sorttype(1,$event)">价格<i class="fa fa-caret-up"></i><i class="fa fa-caret-down"></i></li>
                <li @click="sorttype(2,$event)">销量<i class="fa fa-caret-up"></i><i class="fa fa-caret-down"></i></li>
            </ul>
            <div class="classify">
                <ul>
                    <li @click="allclass">全部</li>
                    <li v-for="(classify,index) in classifys" @click="screen(0,index,$event)">{{classify.text}}</li>
                </ul>
                <ul class="child">
                    <li v-for="(list,index) in lists" @click="mychioescreen(index,$event)">{{list.text}}</li>
                </ul>
            </div>
            <div class="state">
                <ul>
                    <li v-for="(state,index) in states" @click="screen(1,index,$event)">{{state.text}}</li>
                </ul>
            </div>
        </nav>
    </header>
    <section class="content">
        <h2 style="display: none;">商品列表</h2>
        <ul>
            <li V-for="(item,index1) in items" class="productlist">
                <div class="imgbox">
                    <img :src="item.product_pic" onerror="nofind(this)"/>
                    <span class="type">{{item.product_type}}</span>
                </div>
                <div class="info">
                    <h3 class="title">{{item.product_title}}</h3>
                    <p class="standard" v-if="item.specification_arr.length">
                        <span v-for="(list,index2) in item.specification_arr" :class="index2==0?'change':'' " @click="change($event,index1,index2)">
                         {{specificationtext(list.sign)}}  {{list.units}}*{{list.specification}}
                        </span>
                    </p>
                    <p class="productinfo"><span>库存: {{item.stocks}}</span><span>周销量: {{item.weekly_sales}}</span><span>周转天数: {{item.weekly_turn}}</span></p>
                    <p class="pricebox"><span class="price" v-show="!item.last_price&&item.price">售价: ¥{{item.price}}</span><span class="purchasing" v-show="item.last_price&&!item.price">采购价: ¥{{item.last_price}}</span></p>
                    <div class="btns">
                        <button class="btn btn-xs btn-primary" @click="policydown($event)" v-if="item.policy[0] || item.policy[1]">展开  <i class="fa fa-caret-down"></i></button>
                        <button class="btn btn-xs btn-info" @click="change_price(item.sku_id)">调价 <i class="fa fa-balance-scale"></i></button>
                        <!--"item.id"-->
                    </div>
                </div>
                <div class="policy">
                    <span v-for="list in item.policy" v-if="list">{{list}}</span><span class="policyup" @click="policyup($event)"><i class="fa fa-caret-up"></i> 收起</span>
                </div>
            </li>
        </ul>
    </section>
    <div class="box"></div>
    <transition name="fade">
        <div class="shopbox" v-show="shopbox">
            <ul>
                <li onclick="all_shop()">全部</li>
                <li v-for="(list,index) in shoplist" @click="shopchoice(index)">{{list.shop_name}}</li>
            </ul>
        </div>
    </transition>
</div>
<script src="/Public/js/jquery-2.1.0.js"></script>
<script src="/Public/js/vue.js"></script>
<script src="/Public/js/vue-resource.js"></script>
<script src="/Public/js/see.js"></script>
</body>
</html>
